# $Id$
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=kdevelop
pkgver=5.1.80
pkgrel=1
pkgdesc='C++ IDE using KDE technologies based on KDevelop Platform'
arch=(i686 x86_64)
url='http://www.kdevelop.org/'
license=(GPL)
depends=(clang libksysguard kitemmodels knotifyconfig ktexteditor grantlee libkomparediff2 qt5-webengine)
makedepends=(extra-cmake-modules kdoctools kdevelop-pg-qt llvm qt5-tools plasma-framework krunner okteta python mesa
             boost purpose subversion)
optdepends=('konsole: embedded terminal'
            'git: Git support' 'subversion: SVN support' 'cvs: CVS support'
            'gdb: GNU debugger support' 'lldb: LLDB debugger support'
            'qt5-doc: Qt documentation integration'
            'cmake: cmake integration'
            'qt5-tools: qthelp plugin'
            'okteta: hex editor integration'
            'plasma-framework: for the plasma addons'
            'purpose: patch review plugin'
            'cppcheck: code analyzer' 'heaptrack: memory profiler')
conflicts=(kdevelop-qmljs kdevplatform)
replaces=(kdevelop-qmljs kdevplatform)
source=("https://download.kde.org/unstable/$pkgname/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.asc})
sha1sums=('1f5ee7b511a7b6da02c556b4761d398ddde267b5'
          'SKIP')
validpgpkeys=('329FD02C5AA48FCC77A4BBF0AC44AC6DB29779E6') # Sven Brauch <mail@svenbrauch.de>

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_TESTING=OFF
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
